﻿/*
 * This software is the confidential and proprietary
 * information of NetBay
 * Such confidential information should not be disclosed
 * NetBay copyright(c) 2010
 */

#region Using
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
#endregion

namespace NetBay.Core.BusinessEntities
{
    [DataContract]
    public class OccurenciesForOneIndex : ReturnObject
    {
        private long m_lIndexId;
        [DataMember]
        public long IndexId
        {
            get { return m_lIndexId; }
            set { m_lIndexId = value; }
        }

        private List<string> m_oOccurenciesList = new List<string>();
        [DataMember]
        public List<string> OccurenciesList
        {
            get { return m_oOccurenciesList; }
            set { m_oOccurenciesList = value; }
        }

        public OccurenciesForOneIndex()
        { 
        }
        public OccurenciesForOneIndex(long p_lIndexId, List<string> p_oToPopulate)
        {
            IndexId = p_lIndexId;
            OccurenciesList = p_oToPopulate;
        }
        
        #region ToString
        /// <summary>
        /// Extend default description of class
        /// </summary>
        /// <returns>description of instance</returns>
        public override string ToString()
        {
            StringBuilder parameters = new StringBuilder("IndexId<", 4096);
            parameters.Append(IndexId); parameters.Append("> ");
            parameters.Append("Occurencies<");
            foreach (string l_oszOccurency in OccurenciesList)
            {
                parameters.AppendFormat("{0};", l_oszOccurency); 
            }
            parameters.Append("> ");

            return parameters.ToString();
        }
        #endregion
    }
}
